from typing import TypeVar

from sqlalchemy.orm import Mapped, mapped_column, relationship

from recruit.adapter.database.models.base import AbstractResume

Resume = TypeVar('Resume')


class ResumeSkill(AbstractResume):
    """ Model ResumeSkill. """
    skill: Mapped[str] = mapped_column(comment='Ключевые навыки')
    resume: Mapped['Resume'] = relationship(
        back_populates='resume_skill',
        lazy='selectin'
    )
